package com.esri.core.geometry;

import java.util.LinkedList;
import java.util.List;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class CompositeGeographicTransformation {
    private List<GeographicTransformation> a = new LinkedList();

    public CompositeGeographicTransformation add(GeographicTransformation geographicTransformation) {
        if (geographicTransformation == null) {
            throw new IllegalArgumentException("Input transformation can't be null.");
        }
        this.a.add(geographicTransformation);
        return this;
    }

    public List<GeographicTransformation> getTransformations() {
        return this.a;
    }

    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("CompositeTransformation: [");
        boolean z = true;
        for (GeographicTransformation geographicTransformation : this.a) {
            if (z) {
                z = false;
            } else {
                sb.append(",");
            }
            sb.append("WKID:" + geographicTransformation.getWkid());
        }
        sb.append("]");
        return sb.toString();
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public String a() {
        StringBuilder sb = new StringBuilder();
        sb.append("[");
        boolean z = true;
        for (GeographicTransformation geographicTransformation : this.a) {
            if (z) {
                z = false;
            } else {
                sb.append(",");
            }
            sb.append("{");
            sb.append("\"wkid\":" + geographicTransformation.getWkid());
            sb.append(",\"transformForward\":" + geographicTransformation.isTransformForward());
            sb.append("}");
        }
        sb.append("]");
        return sb.toString();
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public static CompositeGeographicTransformation a(JsonParser jsonParser) throws Exception {
        if (jsonParser.nextToken() != JsonToken.START_ARRAY) {
            return null;
        }
        CompositeGeographicTransformation compositeGeographicTransformation = new CompositeGeographicTransformation();
        while (jsonParser.nextToken() != JsonToken.END_ARRAY) {
            compositeGeographicTransformation.add(GeographicTransformation.fromJson(jsonParser));
        }
        return compositeGeographicTransformation;
    }
}
